package com.ymttest.common.enums;

/**
 * 砍价团开团状态
 */
public enum BargainGroupStatusEnum {
	/**
	 * 初始状态 0
	 */
	INITIAL(0),

	/**
	 * 开团成功 1
	 */
	CRT_SUCCESS(1),

	/**
	 * 参团成功 2
	 */
	JOIN_SUCCESS(2),

	/**
	 * 组团成功 3
	 */
	GRP_SUCCESS(3),

	/**
	 * 开团失败 -1
	 */
	CRT_FAIL(-1),

	/**
	 * 参团失败 -2
	 */
	JOIN_FAIL(-2),

	/**
	 * 组团失败 -3
	 */
	GRP_FAIL(-3);


	private int intValue;
	private static java.util.HashMap<Integer, BargainGroupStatusEnum> mappings;

	private synchronized static java.util.HashMap<Integer, BargainGroupStatusEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, BargainGroupStatusEnum>();
		}
		return mappings;
	}

	private BargainGroupStatusEnum(int value) {
		intValue = value;
		BargainGroupStatusEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static BargainGroupStatusEnum forValue(int value) {
		return getMappings().get(value);
	}
}